package com.netease.nie.model;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import com.netease.nie.base.utils.JsonUtils;


public class Credit implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1561267457956010496L;

	private long userId;
	private int level;
	private int currentCredit;
	private int lastYearHighestCredit;
	private int totalGainCredit;
	private int totalExpireCredit;
	private int readyToExpireCredit;
	private int totalUseCredit;
	private int maintainCredit;
	private int init;
	private long modifyTime;

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public int getCurrentCredit() {
		return currentCredit;
	}

	public void setCurrentCredit(int currentCredit) {
		this.currentCredit = currentCredit;
	}

	public int getLastYearHighestCredit() {
		return lastYearHighestCredit;
	}

	public void setLastYearHighestCredit(int lastYearHighestCredit) {
		this.lastYearHighestCredit = lastYearHighestCredit;
	}

	public int getReadyToExpireCredit() {
		return readyToExpireCredit;
	}

	public void setReadyToExpireCredit(int readyToExpireCredit) {
		this.readyToExpireCredit = readyToExpireCredit;
	}

	public int getTotalUseCredit() {
		return totalUseCredit;
	}

	public void setTotalUseCredit(int totalUseCredit) {
		this.totalUseCredit = totalUseCredit;
	}
	
	public int getTotalGainCredit() {
		return totalGainCredit;
	}

	public void setTotalGainCredit(int totalGainCredit) {
		this.totalGainCredit = totalGainCredit;
	}

	public int getTotalExpireCredit() {
		return totalExpireCredit;
	}

	public void setTotalExpireCredit(int totalExpireCredit) {
		this.totalExpireCredit = totalExpireCredit;
	}

	public int getMaintainCredit() {
		return maintainCredit;
	}

	public void setMaintainCredit(int maintainCredit) {
		this.maintainCredit = maintainCredit;
	}
	
	public long getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(long modifyTime) {
		this.modifyTime = modifyTime;
	}

	public int getInit() {
		return init;
	}

	public void setInit(int init) {
		this.init = init;
	}

	@Override
	public String toString() {
		Map<String, Object> jsonMap = new HashMap<>();
		jsonMap.put("userId", userId);
		jsonMap.put("level", level);
		jsonMap.put("currentCredit", currentCredit);
		jsonMap.put("lastYearHighestCredit", lastYearHighestCredit);
		jsonMap.put("totalGainCredit", totalGainCredit);
		jsonMap.put("totalExpireCredit", totalExpireCredit);
		jsonMap.put("readyToExpireCredit", readyToExpireCredit);
		jsonMap.put("totalUseCredit", totalUseCredit);
		jsonMap.put("maintainCredit", maintainCredit);
		jsonMap.put("modifyTime", modifyTime);
		return JsonUtils.obj2String(jsonMap);
	}
}
